xl, libxl: Add per-device and global permissive config options for pci passthrough
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 4 Apr 2012 15:06:42 +0000 (16:06 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 4 Apr 2012 15:06:42 +0000 (16:06 +0100)
commitabda66fdb0eaa1b7ec33e97e3e0e375f948dc651
treeb3bee62f8dc1249e0eaa239e657204de0baf0415
parent543e95e992087a26e2e4e3a1a763ffc348bb6f30
xl, libxl: Add per-device and global permissive config options for pci passthrough

By default pciback only allows PV guests to write "known safe" values into
PCI config space.  But many devices require writes to other areas of config
space in order to operate properly.  One way to do that is with the "quirks"
interface, which specifies areas known safe to a particular device; the
other way is to mark a device as "permissive", which tells pciback to allow
all config space writes for that domain and device.

This adds a "permissive" flag to the libxl_pci struct and teaches libxl how
to write the appropriate value into sysfs to enable the permissive feature for
devices being passed through.  It also adds the permissive config options either
on a per-device basis, or as a global option in the xl command-line.

Because of the potential stability and security implications of enabling
permissive, the flag is left off by default.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
docs/man/xl.cfg.pod.5
tools/libxl/libxl_pci.c
tools/libxl/libxl_types.idl
tools/libxl/libxlu_pci.c
tools/libxl/xl_cmdimpl.c